project(test1)
cmake_minimum_required(VERSION 3.0)

set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup")
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup  -dynamiclib")

# add_definitions(-std=c++11)
# set (CMAKE_CXX_STANDARD 11)
add_compile_options(-std=c++11)

include_directories(${kcp_SOURCE_DIR}/)
include_directories(/usr/local/Cellar/erlang/18.0.3/lib/erlang/usr/include/)

file(GLOB kcp_SRC
	"*.cpp"
)

file(GLOB kcp_SRC2
	"*.c"
)

add_library(test1 SHARED ${kcp_SRC} ${kcp_SRC2})
set_target_properties(test1 PROPERTIES SUFFIX ".so")
